<template>
    <!-- 富文本 -->

    <view class="diy-richText" :style="'padding: ' + itemStyle.paddingTop + 'px ' + itemStyle.paddingLeft + 'px; background: ' + itemStyle.background + ';'">
        <!-- <template is="wxParse" :data="wxParseData:contentT.nodes"></template> -->
        <mp-html :content="article_contentT"></mp-html>
    </view>
</template>

<script>
import zanNoticebar from '../../noticebar/index';
const wxParse = require('../../../utils/wxParse.js');
export default {
    components: {
        zanNoticebar
    },
    data() {
        return {
            article_contentT: ''
        };
    },
    options: {},
    /**
     * 组件的属性列表
     * 用于组件自定义设置
     */
    props: {
        itemIndex: String,
        itemStyle: Object,
        params: Object
    },
    mounted() {
        // 处理小程序 ready 生命周期
        this.$nextTick(() => this.ready());
    },
    methods: {
        ready: function () {
            let content = this.params.content;
            // 富文本转码
            if (content.length > 0) {
                this.article_contentT = this.escape2Html(content);
            }
        }
    },
    created: function () {}
};
</script>
<style>
@import './richText.css';
</style>
